package model;

import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;

public class Comment {
	
	private Date commentDate;
	private String comment;
	
	public Comment() {
		
	}
	
    public Comment(Date commentDate, String comment) {
		this.commentDate = commentDate;
    	this.comment = comment;
	}

	public String getComment() {
		return comment;
	}

	public void setComment(String comment) {
		this.comment = comment;
	}

	public String getCommentDate() {
		return dateToString(commentDate);
	}

	public void setCommentDate(Date commentDate) {
		this.commentDate = commentDate;
	}
	
	private String dateToString(Date date) {
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        String dateformat = "";
        sdf.applyPattern("dd-MM-yyyy");
		dateformat = sdf.format(date);
        return dateformat;
	}

}
